/*
 * Copyright © 2018 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
*/

@import "../../../../styles/mixins.scss";
@import "../../../../styles/variables.scss";
$enabled-color: $green-02;
$disabled-color: $red-02;

.profiles-list-view {
  .grid-wrapper {
    max-height: none;
  }
  .grid.grid-container {
    max-height: none;
    .grid-row {
      grid-template-columns: 70px 1.5fr 1.5fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 30px;

      .sortable-header {
        cursor: pointer;

        &.active {
          text-decoration: underline;
        }

        .icon-svg {
          font-size: 1.3rem;
        }
      }

      &.sub-header {
        border: 0;
        padding: 0;
        color: $grey-05;
        grid-template-columns: 70px 1.5fr 1.5fr 1fr 1fr 2fr 0fr 1fr 1fr 1fr 30px;

        .sub-title {
          border-bottom: 2px solid gray;
        }

        .sub-title + div {
          margin-left: -25px;
        }

        > div {
          padding: 0 5px 0 0;
          margin-right: 20px;
          margin-left: 10px;
          border: 0;
        }
      }
    }
    .grid-header {
      .grid-row {
        padding-top: 0;
      }
    }
    .grid-body {
      .grid-row {
        padding: 0;
        color: $grey-01;

        &.native-profile {
          cursor: not-allowed;

          .default-star {
            cursor: pointer;
          }

          .profile-actions-popover {
            cursor: not-allowed;

            &:hover {
              .icon-cog-empty {
                stroke: $grey-04;
              }
            }
          }
        }

        &:last-child {
          &:not(.highlighted) {
            border-bottom: 0;
          }
        }

        &:hover {
          &:not(.native-profile) {
            .profile-actions-popover {
              .icon-cog-empty {
                stroke: $blue-03;
              }
            }
          }

          .default-star {
            .not-default-profile {
              display: inline-block;
            }
          }
        }

        .default-star {
          .default-profile {
            color: var(--brand-primary-color);
          }

          .not-default-profile {
            display: none;
          }
        }

        .profile-label {
          white-space: nowrap;
        }

        .enabled-label {
          color: $enabled-color;
        }

        .disabled-label {
          color: $disabled-color;
        }
      }
    }
  }

  a {
    color: $blue-03;
  }
}

.import-profile-label {
  color: $blue-03;
  cursor: pointer;
  font-size: 13px;

  #import-profile {
    display: none;
  }
}
